package com.doit.mr.day01;

import com.doit.mr.day01.MyUtil.MyUtils;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.mapred.IFileOutputStream;

/**
 * @DATE 2021/12/8/10:52
 * @Author MDK
 * @Version 2021.2.2
 **/
public class C07_WriteData02 {
    public static void main(String[] args) throws Exception {
        //在原有文本内容的基础上续写文本
        FileSystem fs = MyUtils.getFileSystem();
        FSDataOutputStream fos = fs.append(new Path("/1.txt"));
        fos.writeUTF("hello girls");
        fos.close();
        fs.close();
    }
}
